# coding=utf-8
# 全世界最帅的帅哥
class LinkedList(object):
    def __init__(self, val=None, next_=None):
        self.val = val
        self.next = next_


def list2linked_list(lst):
    if not lst:
        return None
    head = LinkedList(lst[0])
    prev = head
    for num in lst[1:]:
        cur = LinkedList(num)
        prev.next = cur
        prev = prev.next

    return head